package com.yuyang.gulimall.product.feign.fallback;

import com.yuyang.common.exception.BizCodeEnum;
import com.yuyang.common.utils.R;
import com.yuyang.gulimall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author yu yang
 * @date 2023/2/14 -16:50
 */
@Slf4j
@Component
public class SeckillFeignServiceFallBack implements SeckillFeignService {
    @Override
    public R getSkuInfoSeckill(Long skuId) {
        log.info("秒杀服务熔断...调用getSkuInfoSeckill");
        return R.error(BizCodeEnum.TOO_MANY_REQUEST.getCode(),BizCodeEnum.TOO_MANY_REQUEST.getMsg());
    }
}
